<template>
  <div class="box">
      <div class="container-item" v-for="(item,index) in secondList" :key="index" @click="goDetails(item)">
          <img :src="item.icon" alt="">
          <p>{{item.name}}</p>
      </div>
        <div style="height:1.6rem"></div>
  </div>
</template>

<script>
export default {
    props:{
        secondList:{
            type:Array
        }
    },
    methods:{
        goDetails(item){
            this.$emit("goDetails",item.id)
        }
    }
}
</script>

<style scoped>
    .box{
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
    }
    .container-item{
        width: 30%;
        text-align: center;
        margin-top: .1rem;
        height: 2rem;
    }
    .container-item img {
        width: 80%;
    }
    p{
        margin: 0px;
        padding: 0px;
    }
</style>